<!--
* @Description useCommandComponent 优雅弹框
* @author 三咲问道
* @date 2025/7/31
-->

<template>
  <div>
    <el-button @click="actionDialog()">open dialog</el-button>
    <TestDialog @register="register" />
  </div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
// import { userStore } from "/@/store/modules/user";
import TestDialog from "./TestDialog.vue";
import { useDialog } from "./useDialog.ts";

export default defineComponent({
  components: { TestDialog },
  setup() {
    const [register, { actionDialog }] = useDialog({ title: "Dialog" });
    return {
      register,
      actionDialog,
    };
  },
});
</script>